<#assign prefixName = 'WHERE'>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__id??)>
	<#if (where__and__eq__id__value??)>
${prefixName} T.ID = :where__and__eq__id__value
	<#else>
${prefixName} T.ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__id__value??)>
${prefixName} T.ID <> :where__and__nq__id__value
	<#else>
${prefixName} T.ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__id__value??)>
${prefixName} T.ID = :where__or__eq__id__value
	<#else>
${prefixName} T.ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__id??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__id__value??)>
${prefixName} T.ID <> :where__or__nq__id__value
	<#else>
${prefixName} T.ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__endDaTi??)>
	<#if (where__and__eq__endDaTi__value??)>
${prefixName} T.END_DA_TI = :where__and__eq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__endDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__endDaTi__value??)>
${prefixName} T.END_DA_TI <> :where__and__nq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__endDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__endDaTi__value??)>
${prefixName} T.END_DA_TI = :where__or__eq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__endDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__endDaTi__value??)>
${prefixName} T.END_DA_TI <> :where__or__nq__endDaTi__value
	<#else>
${prefixName} T.END_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__beginDaTi??)>
	<#if (where__and__eq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI = :where__and__eq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__beginDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI <> :where__and__nq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__beginDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI = :where__or__eq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__beginDaTi??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__beginDaTi__value??)>
${prefixName} T.BEGIN_DA_TI <> :where__or__nq__beginDaTi__value
	<#else>
${prefixName} T.BEGIN_DA_TI IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__userGrId??)>
	<#if (where__and__eq__userGrId__value??)>
${prefixName} T.USER_GR_ID = :where__and__eq__userGrId__value
	<#else>
${prefixName} T.USER_GR_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__userGrId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__userGrId__value??)>
${prefixName} T.USER_GR_ID <> :where__and__nq__userGrId__value
	<#else>
${prefixName} T.USER_GR_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__userGrId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__userGrId__value??)>
${prefixName} T.USER_GR_ID = :where__or__eq__userGrId__value
	<#else>
${prefixName} T.USER_GR_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__userGrId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__userGrId__value??)>
${prefixName} T.USER_GR_ID <> :where__or__nq__userGrId__value
	<#else>
${prefixName} T.USER_GR_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
<#if (where__and__eq__roleId??)>
	<#if (where__and__eq__roleId__value??)>
${prefixName} T.ROLE_ID = :where__and__eq__roleId__value
	<#else>
${prefixName} T.ROLE_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__and__nq__roleId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName='AND'>
</#if>
	<#if (where__and__nq__roleId__value??)>
${prefixName} T.ROLE_ID <> :where__and__nq__roleId__value
	<#else>
${prefixName} T.ROLE_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__eq__roleId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__eq__roleId__value??)>
${prefixName} T.ROLE_ID = :where__or__eq__roleId__value
	<#else>
${prefixName} T.ROLE_ID IS NULL
	</#if>
	<#assign prefixName = ''>
</#if>
<#if (where__or__nq__roleId??)>
<#if (prefixName!) != 'WHERE'>
	<#assign prefixName = 'OR'>
</#if>
	<#if (where__or__nq__roleId__value??)>
${prefixName} T.ROLE_ID <> :where__or__nq__roleId__value
	<#else>
${prefixName} T.ROLE_ID IS NOT NULL
	</#if>
	<#assign prefixName = ''>
</#if>
